package cn.qyd.collections;

import java.util.Arrays;
import java.util.PriorityQueue;

/**
 * @author 邱运铎
 * @date 2024-03-26 23:46
 */
public class PriorityQueueDemo {
    public static void main(String[] args) {
        PriorityQueue<int[]> queue = new PriorityQueue<>((a, b) -> a[0] - b[0]);
        queue.offer(new int[]{2,3});
        queue.offer(new int[]{6,9});
        queue.offer(new int[]{3,9});
        queue.offer(new int[]{1,10});
        System.out.println(Arrays.toString(queue.peek()));
    }
}
